#pragma once

#ifndef __IASSISTGEN2_UIMODULEDEF_H
#define __IASSISTGEN2_UIMODULEDEF_H

#include <string>
#include "CommonUtil.h"

typedef enum {
	MODULE_SpeechManager,
	MODULE_LanguageInterpretation,
	MODULE_GestureInterpretation,
	MODULE_DialogueManager,
	MODULE_ContextManager,
	MODULE_KnowledgeManager,
	MODULE_ApplicationManager,
	MODULE_PresentationManager,
	MODULE_ClientManager,
	MODULE_IdentityManager,
	MODULE_EventRouter,
	MODULE_OTHER
}UIModuleType;

static const char* UIModuleTypeStrings[] = {
	"Speech",
	"NLU",
	"GestureInterpretor",
	"DM",
	"CM",
	"KM",
	"AM",
	"PM",
	"CLIENT",
	"SI",
	"EventRouter",
	"OTHER"
};


static const UIModuleType getModuleType(std::string str) {
	if (equalsIgnoreCase(str, "Speech"))	return MODULE_SpeechManager;
	if (equalsIgnoreCase(str, "NLU"))		return MODULE_LanguageInterpretation;
	if (equalsIgnoreCase(str, "Gesture"))	return MODULE_GestureInterpretation;
	if (equalsIgnoreCase(str, "DM"))		return MODULE_DialogueManager;
	if (equalsIgnoreCase(str, "CM"))		return MODULE_ContextManager;
	if (equalsIgnoreCase(str, "KM"))		return MODULE_KnowledgeManager;
	if (equalsIgnoreCase(str, "AM"))		return MODULE_ApplicationManager;
	if (equalsIgnoreCase(str, "PM"))		return MODULE_PresentationManager;
	if (equalsIgnoreCase(str, "GUI"))		return MODULE_PresentationManager;
	if (equalsIgnoreCase(str, "CLIENT"))	return MODULE_ClientManager;
	if (equalsIgnoreCase(str, "SI"))		return MODULE_IdentityManager;
	if (equalsIgnoreCase(str, "EventRouter"))		return MODULE_EventRouter;
	return MODULE_OTHER;
}

static const std::string getModuleName(UIModuleType type) {
	return UIModuleTypeStrings[type];
}


#endif
